package com.yima.baseproj.module.sys.picture;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yima.baseproj.config.mybatis.handler.MybatisDateTypeHandler;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@ToString
@TableName("yry_picture")
public class PictureEntity implements Serializable {

    @TableId(value = "id" ,type = IdType.AUTO)
    private Integer id;

    private String pictureUrl;

    private Integer studentId;

    private Integer ifTeacher;

    @TableField(fill = FieldFill.INSERT,value = "create_by")
    private String createBy;

    @TableField(fill = FieldFill.INSERT,value = "create_time",typeHandler = MybatisDateTypeHandler.class)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_by")
    private String updateBy;

    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_time",typeHandler = MybatisDateTypeHandler.class)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",locale = "zh")
    private Date updateTime;

    @TableField(value = "del_flag")
    @TableLogic(value = "0",delval = "1")
    private String delFlag = "0";

    @TableField(exist = false)
    //学生姓名
    private String studentName;


    @TableField(exist = false)
    private String kgName; //所属幼儿园名称

    @TableField(exist = false)
    private String className; //所属班级名称

}
